<?php
define("PAGE_LOAD_START", round(microtime(), 4));
define("DBHOST", "localhost");
define("DBUSER", "root");
define("DBPASS", "bluelemurs");
define("DBNAME", "lemurcms");
define("DBTABLEPREFIX", "asdf_");
define("DBPORT", "3306");
define("MYSQL_NUM_QUERIES", 0);
define("MYSQL_QUERY_TIME", 0);
$system_content = "";
$system_header = "";
function windowsToUnixPathC ($str) {
	$str = preg_replace('/[a-zA-Z]:\\\/', '\\', $str);
	$str = str_replace("\\",'/', $str);
	return $str;
}
$base_pages = array("index.php", "admin.php", "test.php", "config.php");
$base_url[0] = windowsToUnixPathC(realpath(getcwd().'/')).'/';
foreach($base_pages as $key => $value) {
	$base_url = explode($value, $base_url[0]);
}
$visual[0] = $_SERVER["REQUEST_URI"];
foreach($base_pages as $key => $value) {
	$visual = explode($value, $visual[0]);
	$visual = preg_split("/content\/*\/*/", $visual[0]);
}
if(substr_count($visual[0], '?') > 0) {
	if(substr_count($visual[0], 'debug=') > 0) {
		$visual[0] = preg_replace('/(.*)(\?|&)debug=[^&]+?(&)(.*)/i', '$1$2$4', $visual[0] . '&');
		$visual[0] = substr($visual[0], 0, -1);
	}
	$visual[0] = preg_replace('/(.*)(\?|&)page=[^&]+?(&)(.*)/i', '$1$2$4', $visual[0] . '&');
	$visual[0] = substr($visual[0], 0, -1);
}
define('BASE_URL', $base_url[0]);
define('THEME_URL', $visual[0]);
if(!defined('S_BASE_URL')) {
	define('S_BASE_URL', $visual[0]);
}
?>